// 引入核心库
import Vue from 'vue'
//引入Vuex核心插件
import Vuex from 'vuex'
//使用Vuex
Vue.use(Vuex)
const store =new Vuex.Store({
    state:{
        token: window.localStorage.getItem("token"),   
        client:{
            uid:"",
            grade:'',
            client_phone:'',
        },
       // addinforlist:JSON.parse(window.sessionStorage.getItem("addinforlist")) ,//收货地址记录
    },
    mutations:{
        userToken(state,value){
            state.token=value
        },
        userClient(state,value){
            state.client={
                uid:value.uid,
                grade:value.grade,
                client_phone:value.client_phone
            }
        },
       // receipt(state,value){
       //     state.receiptList=value
       // }
    }

})
export default store
//token:window.localStorage.getItem("token"),